package com.itshare.video.util.mapping;

import com.itshare.video.pojo.dto.VideoCommentDTO;
import com.itshare.video.pojo.po.VideoComment;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @Author lyr
 * @create 2020/10/31 11:02
 */
@Mapper
public interface CommentDTOMapping {


    /**
     *  commentDTO 转comment
     * @param
     * @return
     */
    @Mappings({
            @Mapping(source = "fromUserName",target = "fromUserName"),
            @Mapping(source = "atUserName",target = "atUserName"),
            @Mapping(source = "atUserId",target = "atUserId"),
            @Mapping(source = "parentId",target = "parentCommentId"),
            @Mapping(source = "content",target = "content")
    })
    VideoComment from(VideoCommentDTO videoCommentDTO);
}
